<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>管理员管理系统</title>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
        }
        
        body {
            background-color: #f5f7fa;
            color: #333;
            line-height: 1.6;
            padding: 20px;
        }
        
        .container {
            max-width: 1400px;
            margin: 0 auto;
            background: white;
            border-radius: 12px;
            box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
            overflow: hidden;
        }
        
        header {
            background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
            color: white;
            padding: 20px 30px;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        
        .header-left h1 {
            font-size: 28px;
            font-weight: 600;
            display: flex;
            align-items: center;
            gap: 10px;
        }
        
        .header-right {
            display: flex;
            align-items: center;
            gap: 20px;
        }
        
        .search-box {
            display: flex;
            background: rgba(255, 255, 255, 0.2);
            border-radius: 25px;
            padding: 6px 15px;
            align-items: center;
        }
        
        .search-box input {
            background: transparent;
            border: none;
            color: white;
            padding: 8px;
            width: 220px;
            outline: none;
        }
        
        .search-box input::placeholder {
            color: rgba(255, 255, 255, 0.7);
        }
        
        .user-profile {
            display: flex;
            align-items: center;
            gap: 10px;
            cursor: pointer;
        }
        
        .user-avatar {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            background-color: #fff;
            display: flex;
            align-items: center;
            justify-content: center;
            color: #6a11cb;
            font-weight: bold;
            font-size: 18px;
        }
        
        .stats-cards {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
            gap: 20px;
            padding: 25px;
            background: #f9fafc;
        }
        
        .stat-card {
            background: white;
            border-radius: 12px;
            padding: 20px;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
            display: flex;
            align-items: center;
            gap: 15px;
        }
        
        .stat-icon {
            width: 60px;
            height: 60px;
            border-radius: 12px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 24px;
            color: white;
        }
        
        .icon-1 {
            background: linear-gradient(135deg, #ff6b6b 0%, #ff8e53 100%);
        }
        
        .icon-2 {
            background: linear-gradient(135deg, #4ecdc4 0%, #44a08d 100%);
        }
        
        .icon-3 {
            background: linear-gradient(135deg, #ffa726 0%, #ff7043 100%);
        }
        
        .icon-4 {
            background: linear-gradient(135deg, #ab47bc 0%, #8e24aa 100%);
        }
        
        .stat-info h3 {
            font-size: 24px;
            font-weight: 700;
            margin-bottom: 5px;
        }
        
        .stat-info p {
            color: #777;
            font-size: 14px;
        }
        
        .filters {
            display: flex;
            justify-content: space-between;
            align-items: center;
            background: white;
            padding: 15px 25px;
            border-bottom: 1px solid #eee;
        }
        
        .filter-left {
            display: flex;
            gap: 15px;
            align-items: center;
        }
        
        .filter-btn {
            padding: 8px 16px;
            background: #f1f5f9;
            border: none;
            border-radius: 8px;
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 8px;
            color: #555;
            transition: all 0.3s;
        }
        
        .filter-btn:hover {
            background: #6a11cb;
            color: white;
        }
        
        .filter-right button {
            padding: 10px 20px;
            background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
            color: white;
            border: none;
            border-radius: 8px;
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 8px;
            font-weight: 500;
            transition: all 0.3s;
        }
        
        .filter-right button:hover {
            opacity: 0.9;
            transform: translateY(-2px);
        }
        
        .admin-table {
            width: 100%;
            border-collapse: collapse;
        }
        
        .admin-table th {
            background-color: #f8f9fa;
            padding: 15px;
            text-align: left;
            font-weight: 600;
            color: #495057;
            border-bottom: 2px solid #e9ecef;
        }
        
        .admin-table td {
            padding: 15px;
            border-bottom: 1px solid #e9ecef;
        }
        
        .admin-table tr:hover {
            background-color: #f8f9fa;
        }
        
        .admin-avatar {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            background: #dee2e6;
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: bold;
            color: #495057;
        }
        
        .role-badge {
            padding: 5px 12px;
            border-radius: 20px;
            font-size: 12px;
            font-weight: 500;
        }
        
        .role-super {
            background: #fff0f0;
            color: #ff6b6b;
        }
        
        .role-admin {
            background: #e6f7ff;
            color: #1890ff;
        }
        
        .role-audit {
            background: #f6ffed;
            color: #52c41a;
        }
        
        .status-badge {
            padding: 5px 10px;
            border-radius: 20px;
            font-size: 12px;
            font-weight: 500;
        }
        
        .status-active {
            background: #e6f7ff;
            color: #1890ff;
        }
        
        .status-inactive {
            background: #fff2e8;
            color: #fa8c16;
        }
        
        .action-btn {
            padding: 6px 12px;
            border: none;
            border-radius: 6px;
            cursor: pointer;
            display: inline-flex;
            align-items: center;
            gap: 5px;
            font-size: 14px;
            transition: all 0.3s;
        }
        
        .edit-btn {
            background: #e3f2fd;
            color: #1976d2;
        }
        
        .edit-btn:hover {
            background: #bbdefb;
        }
        
        .delete-btn {
            background: #ffebee;
            color: #d32f2f;
        }
        
        .delete-btn:hover {
            background: #ffcdd2;
        }
        
        .toggle-btn {
            background: #f3e5f5;
            color: #7b1fa2;
        }
        
        .toggle-btn:hover {
            background: #e1bee7;
        }
        
        .pagination {
            display: flex;
            justify-content: center;
            padding: 20px;
            gap: 10px;
        }
        
        .pagination button {
            padding: 8px 15px;
            background: white;
            border: 1px solid #ddd;
            border-radius: 6px;
            cursor: pointer;
            transition: all 0.3s;
        }
        
        .pagination button.active {
            background: #6a11cb;
            color: white;
            border-color: #6a11cb;
        }
        
        .pagination button:hover:not(.active) {
            background: #f1f5f9;
        }
        
        .modal {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.5);
            z-index: 1000;
            justify-content: center;
            align-items: center;
        }
        
        .modal-content {
            background: white;
            border-radius: 12px;
            width: 500px;
            max-width: 90%;
            box-shadow: 0 5px 30px rgba(0, 0, 0, 0.2);
            overflow: hidden;
        }
        
        .modal-header {
            padding: 20px;
            border-bottom: 1px solid #eee;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        
        .modal-header h2 {
            font-size: 20px;
            font-weight: 600;
            color: #333;
        }
        
        .modal-body {
            padding: 20px;
        }
        
        .form-group {
            margin-bottom: 20px;
        }
        
        .form-group label {
            display: block;
            margin-bottom: 8px;
            font-weight: 500;
            color: #555;
        }
        
        .form-group input,
        .form-group select {
            width: 100%;
            padding: 12px;
            border: 1px solid #ddd;
            border-radius: 8px;
            font-size: 16px;
            transition: border 0.3s;
        }
        
        .form-group input:focus,
        .form-group select:focus {
            border-color: #6a11cb;
            outline: none;
        }
        
        .modal-footer {
            padding: 20px;
            border-top: 1px solid #eee;
            display: flex;
            justify-content: flex-end;
            gap: 15px;
        }
        
        .modal-footer button {
            padding: 10px 20px;
            border: none;
            border-radius: 8px;
            cursor: pointer;
            font-weight: 500;
            transition: all 0.3s;
        }
        
        .btn-cancel {
            background: #f1f5f9;
            color: #555;
        }
        
        .btn-cancel:hover {
            background: #e5e9f0;
        }
        
        .btn-save {
            background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
            color: white;
        }
        
        .btn-save:hover {
            opacity: 0.9;
        }
        
        @media (max-width: 992px) {
            .admin-table {
                display: block;
                overflow-x: auto;
            }
            
            .stats-cards {
                grid-template-columns: repeat(2, 1fr);
            }
        }
        
        @media (max-width: 768px) {
            .stats-cards {
                grid-template-columns: 1fr;
            }
            
            .filters {
                flex-direction: column;
                gap: 15px;
                align-items: flex-start;
            }
            
            .header-right {
                display: none;
            }
            
            .filter-left {
                flex-wrap: wrap;
            }
        }
    </style>
</head>
<body>
    <div class="container">
        <header>
            <div class="header-left">
                <h1><i class="fas fa-user-shield"></i> 管理员管理系统</h1>
            </div>
            <div class="header-right">
                <div class="search-box">
                    <i class="fas fa-search"></i>
                    <input type="text" placeholder="搜索管理员...">
                </div>
                <div class="user-profile">
                    <div class="user-avatar">A</div>
                    <span>超级管理员</span>
                </div>
            </div>
        </header>
        
        <div class="stats-cards">
            <div class="stat-card">
                <div class="stat-icon icon-1">
                    <i class="fas fa-users"></i>
                </div>
                <div class="stat-info">
                    <h3>28</h3>
                    <p>管理员总数</p>
                </div>
            </div>
            
            <div class="stat-card">
                <div class="stat-icon icon-2">
                    <i class="fas fa-user-check"></i>
                </div>
                <div class="stat-info">
                    <h3>22</h3>
                    <p>活跃管理员</p>
                </div>
            </div>
            
            <div class="stat-card">
                <div class="stat-icon icon-3">
                    <i class="fas fa-user-times"></i>
                </div>
                <div class="stat-info">
                    <h3>6</h3>
                    <p>禁用管理员</p>
                </div>
            </div>
            
            <div class="stat-card">
                <div class="stat-icon icon-4">
                    <i class="fas fa-user-tie"></i>
                </div>
                <div class="stat-info">
                    <h3>3</h3>
                    <p>超级管理员</p>
                </div>
            </div>
        </div>
        
        <div class="filters">
            <div class="filter-left">
                <button class="filter-btn"><i class="fas fa-filter"></i> 筛选</button>
                <button class="filter-btn"><i class="fas fa-sort"></i> 排序</button>
                <button class="filter-btn"><i class="fas fa-search"></i> 高级搜索</button>
            </div>
            <div class="filter-right">
                <button id="add-admin-btn"><i class="fas fa-plus"></i> 添加管理员</button>
            </div>
        </div>
        
        <table class="admin-table">
            <thead>
                <tr>
                    <th>管理员</th>
                    <th>账号</th>
                    <th>角色</th>
                    <th>手机号</th>
                    <th>邮箱</th>
                    <th>状态</th>
                    <th>创建时间</th>
                    <th>操作</th>
                </tr>
            </thead>
            <tbody>
                <tr>
                    <td>
                        <div style="display: flex; align-items: center; gap: 10px;">
                            <div class="admin-avatar">A</div>
                            <div>张明</div>
                        </div>
                    </td>
                    <td>admin_zhang</td>
                    <td><span class="role-badge role-super">超级管理员</span></td>
                    <td>138****8888</td>
                    <td>zhang@example.com</td>
                    <td><span class="status-badge status-active">已启用</span></td>
                    <td>2023-01-15</td>
                    <td>
                        <button class="action-btn edit-btn"><i class="fas fa-edit"></i> 编辑</button>
                        <button class="action-btn toggle-btn"><i class="fas fa-ban"></i> 禁用</button>
                    </td>
                </tr>
                <tr>
                    <td>
                        <div style="display: flex; align-items: center; gap: 10px;">
                            <div class="admin-avatar">L</div>
                            <div>李华</div>
                        </div>
                    </td>
                    <td>admin_li</td>
                    <td><span class="role-badge role-admin">管理员</span></td>
                    <td>139****6666</td>
                    <td>li@example.com</td>
                    <td><span class="status-badge status-active">已启用</span></td>
                    <td>2023-02-20</td>
                    <td>
                        <button class="action-btn edit-btn"><i class="fas fa-edit"></i> 编辑</button>
                        <button class="action-btn toggle-btn"><i class="fas fa-ban"></i> 禁用</button>
                    </td>
                </tr>
                <tr>
                    <td>
                        <div style="display: flex; align-items: center; gap: 10px;">
                            <div class="admin-avatar">W</div>
                            <div>王强</div>
                        </div>
                    </td>
                    <td>admin_wang</td>
                    <td><span class="role-badge role-audit">审核员</span></td>
                    <td>137****5555</td>
                    <td>wang@example.com</td>
                    <td><span class="status-badge status-inactive">已禁用</span></td>
                    <td>2023-03-10</td>
                    <td>
                        <button class="action-btn edit-btn"><i class="fas fa-edit"></i> 编辑</button>
                        <button class="action-btn toggle-btn"><i class="fas fa-check"></i> 启用</button>
                    </td>
                </tr>
                <tr>
                    <td>
                        <div style="display: flex; align-items: center; gap: 10px;">
                            <div class="admin-avatar">Z</div>
                            <div>赵敏</div>
                        </div>
                    </td>
                    <td>admin_zhao</td>
                    <td><span class="role-badge role-admin">管理员</span></td>
                    <td>136****3333</td>
                    <td>zhao@example.com</td>
                    <td><span class="status-badge status-active">已启用</span></td>
                    <td>2023-04-05</td>
                    <td>
                        <button class="action-btn edit-btn"><i class="fas fa-edit"></i> 编辑</button>
                        <button class="action-btn toggle-btn"><i class="fas fa-ban"></i> 禁用</button>
                    </td>
                </tr>
                <tr>
                    <td>
                        <div style="display: flex; align-items: center; gap: 10px;">
                            <div class="admin-avatar">C</div>
                            <div>陈刚</div>
                        </div>
                    </td>
                    <td>admin_chen</td>
                    <td><span class="role-badge role-audit">审核员</span></td>
                    <td>135****2222</td>
                    <td>chen@example.com</td>
                    <td><span class="status-badge status-active">已启用</span></td>
                    <td>2023-05-12</td>
                    <td>
                        <button class="action-btn edit-btn"><i class="fas fa-edit"></i> 编辑</button>
                        <button class="action-btn toggle-btn"><i class="fas fa-ban"></i> 禁用</button>
                    </td>
                </tr>
            </tbody>
        </table>
        
        <div class="pagination">
            <button class="active">1</button>
            <button>2</button>
            <button>3</button>
            <button>4</button>
            <button>5</button>
            <button>...</button>
            <button><i class="fas fa-angle-right"></i></button>
        </div>
    </div>
    
    <!-- 添加/编辑管理员模态框 -->
    <div class="modal" id="admin-modal">
        <div class="modal-content">
            <div class="modal-header">
                <h2 id="modal-title">添加管理员</h2>
                <span class="close-modal" style="cursor: pointer; font-size: 24px;">&times;</span>
            </div>
            <div class="modal-body">
                <div class="form-group">
                    <label for="admin-name">姓名</label>
                    <input type="text" id="admin-name" placeholder="请输入姓名">
                </div>
                <div class="form-group">
                    <label for="admin-account">账号</label>
                    <input type="text" id="admin-account" placeholder="请输入账号">
                </div>
                <div class="form-group">
                    <label for="admin-role">角色</label>
                    <select id="admin-role">
                        <option value="super">超级管理员</option>
                        <option value="admin">管理员</option>
                        <option value="audit">审核员</option>
                    </select>
                </div>
                <div class="form-group">
                    <label for="admin-phone">手机号</label>
                    <input type="text" id="admin-phone" placeholder="请输入手机号">
                </div>
                <div class="form-group">
                    <label for="admin-email">邮箱</label>
                    <input type="email" id="admin-email" placeholder="请输入邮箱">
                </div>
                <div class="form-group">
                    <label for="admin-password">密码</label>
                    <input type="password" id="admin-password" placeholder="请输入密码">
                </div>
            </div>
            <div class="modal-footer">
                <button class="btn-cancel">取消</button>
                <button class="btn-save">保存</button>
            </div>
        </div>
    </div>

    <script>
        // 模态框控制
        const modal = document.getElementById('admin-modal');
        const addAdminBtn = document.getElementById('add-admin-btn');
        const closeModal = document.querySelector('.close-modal');
        const cancelBtn = document.querySelector('.btn-cancel');
        
        addAdminBtn.addEventListener('click', () => {
            document.getElementById('modal-title').textContent = '添加管理员';
            modal.style.display = 'flex';
        });
        
        closeModal.addEventListener('click', () => {
            modal.style.display = 'none';
        });
        
        cancelBtn.addEventListener('click', () => {
            modal.style.display = 'none';
        });
        
        // 点击模态框外部关闭
        window.addEventListener('click', (event) => {
            if (event.target === modal) {
                modal.style.display = 'none';
            }
        });
        
        // 编辑按钮点击事件
        document.querySelectorAll('.edit-btn').forEach(button => {
            button.addEventListener('click', function() {
                const row = this.closest('tr');
                const name = row.querySelector('td:first-child div:nth-child(2)').textContent;
                
                document.getElementById('modal-title').textContent = '编辑管理员';
                document.getElementById('admin-name').value = name;
                modal.style.display = 'flex';
            });
        });
        
        // 启用/禁用按钮点击事件
        document.querySelectorAll('.toggle-btn').forEach(button => {
            button.addEventListener('click', function() {
                const row = this.closest('tr');
                const statusBadge = row.querySelector('.status-badge');
                
                if (statusBadge.classList.contains('status-active')) {
                    statusBadge.classList.remove('status-active');
                    statusBadge.classList.add('status-inactive');
                    statusBadge.textContent = '已禁用';
                    this.innerHTML = '<i class="fas fa-check"></i> 启用';
                } else {
                    statusBadge.classList.remove('status-inactive');
                    statusBadge.classList.add('status-active');
                    statusBadge.textContent = '已启用';
                    this.innerHTML = '<i class="fas fa-ban"></i> 禁用';
                }
            });
        });
        
        // 分页按钮点击事件
        document.querySelectorAll('.pagination button').forEach(button => {
            button.addEventListener('click', function() {
                document.querySelector('.pagination button.active').classList.remove('active');
                this.classList.add('active');
            });
        });
    </script>
</body>
</html>